import PagePath from "@lgq/pages/components/pagePath";
import { usePathStore, useStore } from "@lgq/store";
import { useEffect, useRef, useState } from "react";
import { useLocation, useNavigate } from "react-router-dom";
import { createBook, search } from "../api";

const Workbench = () => {

  const [isInit, setIsiInit] = useState(false);
  const isInitRef = useRef(false);
  const [selectedKeys,setSelectedKeys] = useState<string[]>([]);
  const mSelectedKeys = useRef<Array<string>>([]);
  const navigator = useNavigate();
  const { pathname } = useLocation();

    useEffect(() => {
      console.log("work")
      usePathStore.setState({path : pathname});
    },[]);

    useEffect(() => {
      createBook();
      //search();
    },[]);

  return <div>

    <PagePath />
  </div>;
};


export default Workbench;